A terminal on which CLI software is installed can display, on a CLI, a command typed by a user using a keyboard, and can display, on the CLI, an execution result generated by executing the command. Generally, the CLI software does not support a mouse, and the user needs to type the command using the keyboard. An interface provided by a network device such as a router, a terminal multiplexer, or a cable modem is generally a CLI. The user may query, set, maintain, and manage a service in the network device using the CLI.
In a related technology, a CLI usually includes a command line displaying area and a prompt information displaying area. The command line displaying area is used to display a command typed by a user using a keyboard, and the prompt information displaying area is used to display prompt information matching the command typed by the user. If the user presses a preset command matching key in a process of typing the command, a terminal can query, according to a command currently displayed in the command line displaying area, a word matching the command, and display corresponding prompt information in the prompt information displaying area. The prompt information includes the word matching the command. After the user completes typing of the command according to the prompt information and presses a preset command execution key, the terminal can execute the command displayed in the command line displaying area, generate an execution result, and display the execution result in the prompt information displaying area. In actual application, the preset command matching key is usually a Tab key, and the preset command execution key is usually an Enter key.
When the terminal on which the CLI software is installed displays the execution result on the CLI, the prompt information in the process of typing the command by the user is also displayed in the CLI. As a result, content displayed in the CLI is cumbersome, and the CLI has low display simplicity.